/**
 * Copyright 2015 Qiyi Inc. All rights reserved.
 *
 * @file:   Stream.Action.js
 * @path:   js-src/Stream/
 * @desc:   Action静态对象，声明对象以及绑定事件、对外接口等
 * @author: jiegang@qiyi.com
 * @date:   2015-01-10
 */
qui(
    function(require, exports, module) {


        Stream.Action = (function() {

            // 表格
            var StreamGrid = null;



            var getStreamGrid = function(options) {

                if (!StreamGrid) {
                    StreamGrid = new Stream.Grid($.extend(true, {
                        '$container': $('#StreamListContainer'),
                        type: 0
                    }, options));
                }

                return StreamGrid;

            }

            var StreamGridRun = function(options) {

                StreamGrid = getStreamGrid(options);
                StreamGrid.run();

                console.log('grid run');

            }


            var run = function() {
                Ancestor.Config.EPG_AUTH.list = '/stream/list';
                StreamGridRun({});
                //Stream.Util.streamNameSuggest($('input.streamNameSuggest'));
            }

            return {

                run: run,
                getStreamGrid: getStreamGrid
            }

        })();
    }
);